home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Gfx
/
Edit
/
ImageEngineer
/
ARexx
/
FadeInAnim.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-20
|
2KB
|
87 lines
/*************************/
/* Image Engineer script */
/* Fade In Anim */
/* by Simon Edwards */
/*************************/
Options results
signal on error /* Setup a place for errors to go */
address 'IMAGEENGINEER'
IE_To_Front
TYPE 24bit
'REQUEST "This script generates animation frames of title'||D2C(10)||'image fading in over a background image." "Ok"'
'GET_FILE "Select an Image for background"'
BackFile=result
'GET_FILE "Select an Image for title"'
TitleFile=result
'GET_NUMBER "Enter the number of frames to generate" 1 100 "Ok|Cancel" 10'
NumberOfFrames=RESULT
'GET_FILE "Enter base path and file name"'
BasePath=RESULT
'GET_RENDER COLOUR "Set render options"'
RenderOptions=RESULT
'GET_FILE_TYPE "Select Save format"'
SaveFormat=RESULT
'OPEN "'||BackFile||'"'
BackProject=RESULT
'OPEN "'||TitleFile||'"'
TitleProject=RESULT
PROJECT_INFO BackProject WIDTH
BackWidth=RESULT
PROJECT_INFO BackProject HEIGHT
BackHeight=RESULT
PROJECT_INFO TitleProject WIDTH
TitleWidth=RESULT
PROJECT_INFO TitleProject HEIGHT
TitleHeight=RESULT
XOffset=(BackWidth-TitleWidth)/2
YOffset=(BackHeight-TitleHeight)/2
MARK BackProject SECONDARY
MARK TitleProject PRIMARY
do i=1 to NumberOfFrames
'COMPOSITE ' XOffset YOffset 'MIX' (i-1)/(NumberOfFrames-1)*100 'GENLOCK'
Frame=RESULT
'SET_RENDER' Frame RenderOptions
'RENDER' Frame
'SAVE' Frame '"'||BasePath||right(i,3,'0')||'" "'||SaveFormat||'"'
'CLOSE' Frame
end
'CLOSE' TitleProject
'CLOSE' BackProject
'REQUEST "Done, generated ' NumberOfFrames 'frames."'
exit
/*******************************************************************/
/* This is where control goes when an error code is returned by IE */
/* It puts up a message saying what happened and on which line */
/*******************************************************************/
error:
if RC=5 then do
IE_TO_FRONT
LAST_ERROR
'REQUEST "'||RESULT||'"'
exit
end
else do
IE_TO_FRONT
LAST_ERROR
'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
exit
end